const breakoutBand = {
  name: 'breakoutBand',
  totalStep: 1,
  needDefaultPointFigure: false,
  needDefaultXAxisFigure: false,
  needDefaultYAxisFigure: false,
  createPointFigures: ({ overlay, coordinates }) => {
    if (!coordinates || coordinates.length < 3) {
      return []
    }
    const color = overlay?.extendData?.color ?? 'rgba(8, 153, 129, 0.1)'
    return [
      {
        type: 'polygon',
        attrs: {
          coordinates
        },
        styles: {
          style: 'fill',
          color
        }
      }
    ]
  }
}

export default breakoutBand
